package com.heima.homeservicemanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.heima.homeservicemanagementsystem.entity.common.OrderStatusEnum;
import io.swagger.v3.oas.annotations.tags.Tag;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 订单;
 *
 * @author : http://www.chiner.pro
 * @date : 2025-4-25
 */
@Data
/*@ApiModel(value = "订单",description = "")*/
@Tag(name = "订单")
@TableName(value = "buyr_order", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class BuyrOrder extends BaseEntity {

    @Schema(title = "订单ID", description = "")
    private String orderId;

    @Schema(title = "用户ID", description = "")
    private String userId;

    @Schema(title = "购物车ID", description = "")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> cartId;

    @Schema(title = "地址ID", description = "")
    private String addressId;
    @Schema(title = "地址详情", description = "")
    @TableField(exist = false)
    private UserAddress userAddress;

    @Schema(title = "总金额", description = "")
    private Double totalPrice;

    @Schema(title = "应付金额", description = "")
    private Double payablePrice;

    @Schema(title = "支付方式", description = "")
    private String payMethod;

    @Schema(title = "订单状态", description = "")
    private OrderStatusEnum orderStatus;

    @Schema(title = "预约时间", description = "")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> time;

    @Schema(title = "订单留言备注", description = "")
    private String remark;

    @Schema(title = "服务id", description = "")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> serviceId;
    @Schema(title = "服务数量", description = "")
    private String serviceNumber;
    @Schema(title = "服务名称", description = "")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> serviceName;


    @Schema(title = "服务规格", description = "")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> serviceSpec;

    @Schema(title = "服务照片", description = "")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<String> img;

}